<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ext4yii xmlns:ext="http://www.w3.org/1999/xhtml" xmlns:prop="http://www.w3.org/1999/xhtml"/>

<ext:FieldSet title="Business Information">
    <prop:Body>
        <ext:FormLayout>
            <prop:Anchors>
                <ext:Anchor>
                    <prop:Body>
                        <ext:DateField id="HireDate" fieldlabel="Hire Date" format="Y/m/d" />
                    </prop:Body>
                </ext:Anchor>
                <ext:Anchor>
                    <prop:Body>
                        <ext:TextField id="Phone" fieldlabel="Phone" allowblank="false"/>
                    </prop:Body>
                </ext:Anchor>
                <ext:Anchor>
                    <prop:Body>
                        <ext:TextField id="Fax" fieldlabel="Fax"/>
                    </prop:Body>
                </ext:Anchor>
                <ext:Anchor>
                    <prop:Body>
                        <ext:TextField id="Email" fieldlabel="Email" allowblank="false" vtype="email"/>
                    </prop:Body>
                </ext:Anchor>
                <ext:Anchor>
                    <prop:Body>
                        <ext:ComboBox fieldlabel="Title" id="Title"
                                      forceselection="true"
                                      allowblank="false">
                            <prop:ComboBoxItems>
                                <ext:ComboBoxItem data="General Manager" text="General Manager"/>
                                <ext:ComboBoxItem data="Sales Manager" text="Sales Manager"/>
                                <ext:ComboBoxItem data="IT Manager" text="IT Manager"/>
                                <ext:ComboBoxItem data="General Staff" text="General Staff"/>
                                <ext:ComboBoxItem data="IT Staff" text="IT Staff"/>
                                <ext:ComboBoxItem data="Sales Staff" text="Sales Staff"/>
                            </prop:ComboBoxItems>
                        </ext:ComboBox>
                    </prop:Body>
                </ext:Anchor>

                <ext:Anchor>
                    <prop:Body>
                        <ext:ComboBox
                            id="ReportsTo"
                            fieldlabel="Reports To"
                            store="employeeStore"
                            listsource="<?php echo $this->createUrl('helper/getmanagers') ?>"
                            editable="false"
                            triggeraction="all"
                            forceselection="true"
                            displayfield="LastName"
                            valuefield="EmployeeId">
                            <prop:Actions>
                                <ext:ClientAction onevent="expand">
                                    <prop:Handler>
                                        <script>
                                            function()
                                            {
                                                this.store.reload();
                                            }
                                        </script>
                                    </prop:Handler>
                                </ext:ClientAction>
                            </prop:Actions>
                        </ext:ComboBox>
                    </prop:Body>
                </ext:Anchor>

            </prop:Anchors>
        </ext:FormLayout>
    </prop:Body>
</ext:FieldSet>